﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/FrameMain.Master" AutoEventWireup="true" CodeBehind="LotteryAudit.aspx.cs" Inherits="FortuneHeaven.Admin.Pages.Shop.LotteryAudit" %>

<%@ Register TagPrefix="uc1" TagName="Pagination" Src="~/Controls/Pagination.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function alertAudit() {
            var c = $("#<%= txtGold.ClientID  %>");
            if (!c.val() || c.val() == "") {
                alert("请输入积分数目");
                return false;
            }
            
            if (confirm("是否确定对选择用户发放积分?")) {
                return true;
            }
            else {
                return false;
            }
        }
        function alertDelete() {
            if (confirm("是否确定删除该条记录?")) {
                return true;
            }
            else {
                return false;
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="toolbar">
        <span>积分:</span>
        <asp:TextBox ID="txtGold" runat="server" style="background-image:none; border: 1px solid #7F9DB9; height:20px; line-height:20px;"  CssClass="txt" ></asp:TextBox>
        <asp:Button runat="server" ID="Button2" Text="积分发放"  OnClientClick="return alertAudit();" OnClick="AuditItem" />
        <asp:Button runat="server" ID="Button1" Text="删除记录"  OnClientClick="return alertDelete();" OnClick="DeleteItem" />
    </div>
    
    <div id="head">
        <div class="left">
            <asp:Label ID="lblDeptName" runat="server" Font-Bold="true"></asp:Label>
            <asp:Label ID="lblStatistic" runat="server"></asp:Label>
        </div>
        <div class="right">
            <asp:Label ID="lbGiftOrder" runat="server" Text="用户名: "></asp:Label>
            <asp:TextBox ID="txtOrderID" runat="server"  CssClass="txt" style="width: 113px;" ></asp:TextBox>
            <asp:Button  ID="btnSearch" runat="server" Text="查询" OnClick="SearchValue"/>
            <asp:Label ID="lblShow" runat="server" Text="显示:"></asp:Label>
            <asp:DropDownList ID="drpPagerSize" AutoPostBack="true" runat="server" OnSelectedIndexChanged="drpPagerSize_SelectedIndexChanged">
            </asp:DropDownList>
        </div>
    </div>
    <asp:ListView ID="lvNews" runat="server" EnableViewState="true" EnableModelValidation="True">
        <LayoutTemplate>
            <div id="list">
                <table id="lvList" cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                        <th class="sp">
                            &nbsp;
                        </th>
                        <th class="chk">
                            <input id="chkSelectAll" type="checkbox" onclick="SelectAll2();" />
                        </th>
                        <th>
                            抽奖帐号
                        </th>
                        <th>
                            抽奖奖券
                        </th>
                        <th>
                            申请时间
                        </th>
                        <th>
                            抽奖次数
                        </th>
                        <th>
                            游戏时间
                        </th>
                        <th>
                            联系电话
                        </th>
                        <th>
                            QQ
                        </th>
                        <th>
                            邮箱
                        </th>
                        <th>
                            状态
                        </th>
                        <th>
                            发放人员
                        </th>
                        <th>
                            发放时间
                        </th>
                    </tr>
                    <tbody>
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
                    </tbody>
                </table>
            </div>
        </LayoutTemplate>
        <AlternatingItemTemplate>
            <tr>
                <td class="sp">
                    &nbsp;
                </td>
                <td>
                    <asp:CheckBox ID="chkSelect" runat="server" />
                    <asp:HiddenField ID="hfIDs" runat="server" Value='<%# Eval("ID")%>' />
                     <asp:HiddenField ID="hfUserID" runat="server" Value='<%# Eval("UserID")%>' />
                </td>
                <td>
                    <%# Eval("UserName")%>
                </td>
                <td>
                    <%# Eval("LotteryCode")%>
                </td>
                <td>
                    <%# Eval("RequestTime")%>
                </td>
                <td>
                    <%# Eval("LotteryCount")%>
                </td>
                <td>
                    <%# FortuneHeavenCommon.ComMethod.UtilMethod.GetTimeByInt(Eval("OnLineTimeCount"))%>
                </td>
                <td>
                    <%# Eval("Mobile")%>
                </td>
                <td>
                    <%# Eval("QQ")%>
                </td>
                <td>
                    <%# Eval("Mail")%>
                </td>
                <td>
                    <%# Eval("Status").ToString() == "1"? "已发放":"未发放"%>
                </td>
                <td>
                    <%# Eval("AuditName")%>
                </td>
                <td>
                    <%#  (DateTime)Eval("AuditTime") == DateTime.MinValue ? "" : Eval("AuditTime")%>
                </td>
            </tr>
        </AlternatingItemTemplate>
        <EmptyDataTemplate>
            <table id="Table2" runat="server">
                <tr>
                    <td>
                        没有记录.
                    </td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <ItemTemplate>
            <tr>
                  <td class="sp">
                    &nbsp;
                </td>
                <td>
                    <asp:CheckBox ID="chkSelect" runat="server" />
                    <asp:HiddenField ID="hfIDs" runat="server" Value='<%# Eval("ID")%>' />
                     <asp:HiddenField ID="hfUserID" runat="server" Value='<%# Eval("UserID")%>' />
                </td>
                <td>
                    <%# Eval("UserName")%>
                </td>
                <td>
                    <%# Eval("LotteryCode")%>
                </td>
                <td>
                    <%# Eval("RequestTime")%>
                </td>
                <td>
                    <%# Eval("LotteryCount")%>
                </td>
                <td>
                    <%# FortuneHeavenCommon.ComMethod.UtilMethod.GetTimeByInt(Eval("OnLineTimeCount"))%>
                </td>
                <td>
                    <%# Eval("Mobile")%>
                </td>
                <td>
                    <%# Eval("QQ")%>
                </td>
                <td>
                    <%# Eval("Mail")%>
                </td>
                <td>
                    <%# Eval("Status").ToString() == "1"? "已发放":"未发放"%>
                </td>
                <td>
                    <%# Eval("AuditName")%>
                </td>
                <td>
                    <%#  (DateTime)Eval("AuditTime") == DateTime.MinValue ? "" : Eval("AuditTime")%>
                </td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
    <div id="foot">
        <div class="foot_left">
        </div>
        <div class="foot_right">
            <uc1:Pagination ID="usPager" runat="server" />
        </div>
    </div>
</asp:Content>
